package com.im.service;

public class FileTypeUtil {
	public static boolean isImage(String suffix) {
		if (suffix == null)
			return false;
		return "jpg".equals(suffix) || "png".equals(suffix) || "jpeg".equals(suffix);
	}

	public static boolean isAudio(String suffix) {
		if (suffix == null)
			return false;
		String[] sux = {"amr","ogg","aac","wma","wav","mp3"};
		boolean isAudio = false;
		for (String s : sux) {
			if(s.equalsIgnoreCase(suffix)){
				isAudio = true;
				break;
			}
		}
		return isAudio;
	}
}
